program Project1lkj;

uses
  Forms,
  Windows, 
  SysUtils, 
  SingleInstanceWithParams,
  Unit1 in 'Unit1.pas' {Form1},
  Unit2 in 'Unit2.pas' {Form2};

{$R *.res}

begin
  if not TryOpenMapping then 
    begin 
  Application.Initialize;
  Application.Title := 'Small Notepad';
  Application.CreateForm(TForm1, Form1);
  Application.CreateForm(TForm2, Form2);
  Application.MainForm.HandleNeeded; 
      SetInitialInstanceData; 
      Application.Run; 
    end 
  else 
    PassParamsAndNotify; 
  UnMapViewOfFile(pHeader); 
  CloseHandle(hMapping); 
end. 